﻿<script id="createDomainWizardTmpl" type="text/x-jquery-tmpl">
    <div id="mail_server_create_domain_wizard">
        {{tmpl({require_dns_info: require_dns_info, domain_name: domain_name}) tplName}}
        {{if step == 1 || !ASC.Resources.Master.Standalone && step == 2 || step == total}}
        <div class="progressContainer">
            <div class="loader" style="display: none;">${ASC.Mail.Resources.MailResource.LoadingLabel}</div>
        </div>
        {{/if}}
        <div class="buttons" style="{{if step == 1 || !ASC.Resources.Master.Standalone && step == 2 || step == total}}margin-top: 0;{{else}}margin-top: 15px;{{/if}}">
            <button class="button middle gray cancel" type="button">${ASC.Mail.Resources.MailScriptResource.CancelBtnLabel}</button>
            <button class="button middle blue next pull-right" type="button">
                {{if step == total}}
                    ${ASC.Mail.Resources.MailAdministrationResource.DomainWizardCompleteBtn}
                {{else}}
                    ${ASC.Mail.Resources.MailAdministrationResource.DomainWizardNextBtn}
                {{/if}}
            </button>
            {{if step != 1}}
            <button class="button middle gray prev pull-right" type="button" style="margin-right: 8px;">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardPrevBtn}</button>
            {{/if}}
            <span class="step pull-right"> ${ASC.Mail.Resources.MailAdministrationResource.DomainWizardStep.replace('%1', step).replace('%2', total)}</span>
        </div>
    </div>
</script>

<script id="domainWizardStep1" type="text/x-jquery-tmpl">
    <table>
        <tbody>
            <tr>
                <td>
                    <div class="wizard_action">
                        <span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardWriteDomainName}</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div id="wizard_add_domain" class="requiredField">
                        <span class="requiredErrorText">${ASC.Mail.Resources.MailScriptResource.ErrorEmptyField}</span>
                        <div class="headerPanelSmall bold">${ASC.Mail.Resources.MailAdministrationResource.WebDomainLabel}</div>
                        <input type="text" class="web_domain textEdit" maxlength="255" placeholder="yourcompany.com" />
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</script>

<script id="domainWizardStep2" type="text/x-jquery-tmpl">
    <table>
        <tbody>
            <tr>
                <td>
                    <div>
                        <span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardProveDomainOwnershipInfo}</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <p>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardCopyInfo}</p>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="dns_record">
                        <span class="dns_record_info">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardOwnershpCheckRecord}</span>
                        <ul>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardType}&nbsp;<span class="bold">TXT</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardName}&nbsp;<span class="bold">${require_dns_info.dns.domainCheckRecord.name}</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardTextOrValue}&nbsp;<span class="bold">"${require_dns_info.dns.domainCheckRecord.value}"</span></span></li>
                        </ul>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardGoNextStep} {{html ASC.Mail.Resources.MailAdministrationResource.DomainWizardToFAQ.format('<a target="blank" class="linkDescribe" href="' + window.TMMail.getFaqLink() + '">', '</a>')}}</span>
                </td>
            </tr>
            <tr>
                <td>
                    <p>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardDomainNameSymbolInfo.replace('%1', domain_name)}</p>
                </td>
            </tr>
            <tr>
                <td>
                    <span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardWaitDNSrefrashInfo}</span>
                </td>
            </tr>
        </tbody>
    </table>
</script>

<script id="domainWizardStep3" type="text/x-jquery-tmpl">
    <table>
        <tbody>
            <tr>
                <td>
                    <div  class="wizard_action">
                        <span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardAddRecord.replace('%1', 'MX')}</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="dns_record">
                        <span class="dns_record_info">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardMXRecord}</span>
                        <ul>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardType}&nbsp;<span class="bold">MX</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardTextOrValue}&nbsp;<span class="bold">${require_dns_info.dns.mxRecord.host}.</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardPriority}&nbsp;<span class="bold">${require_dns_info.dns.mxRecord.priority}</span></span></li>
                        </ul>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</script>

<script id="domainWizardStep4" type="text/x-jquery-tmpl">
    <table>
        <tbody>
            <tr>
                <td>
                    <div  class="wizard_action">
                        <span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardAddRecord.replace('%1', 'SPF')}</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="dns_record">
                        <span class="dns_record_info">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardSPFRecord}</span>
                        <ul>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardType}&nbsp;<span class="bold">TXT</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardName}&nbsp;<span class="bold">${require_dns_info.dns.spfRecord.name}</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardTextOrValue}&nbsp;<span class="bold">"${require_dns_info.dns.spfRecord.value}"</span></span></li>
                        </ul>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</script>

<script id="domainWizardStep5" type="text/x-jquery-tmpl">
    <table>
        <tbody>
            <tr>
                <td>
                    <div  class="wizard_action">
                        <span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardAddRecord.replace('%1', 'DKIM')}</span>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="dns_record">
                        <span class="dns_record_info">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardDKIMRecord}</span>
                        <ul>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardType}&nbsp;<span class="bold">TXT</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardName}&nbsp;<span class="bold">${require_dns_info.dns.dkimRecord.selector}._domainkey</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardTextOrValue}&nbsp;<span class="bold dkim_record">"${require_dns_info.dns.dkimRecord.publicKey}"</span></span></li>
                        </ul>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</script>

<script id="domainAddedTmpl" type="text/x-jquery-tmpl">
    <div id="domain_added_container" class="popup popupMailBox">
        {{tmpl({
            errorBodyHeader     : $item.data.errorBodyHeader,
            errorBody           : $item.data.errorBody,
            errorBodyFooter     : $item.data.errorBodyFooter
       }) "errorBodyTmpl"}}
        <div class="buttons">
            <button class="button middle blue cancel" type="button">${ASC.Mail.Resources.MailScriptResource.OkBtnLabel}</button>
        </div>
    </div>
</script>

<script id="domainDnsSettingsTmpl" type="text/x-jquery-tmpl">
    <div id="mail_server_domain_dns_settings" class="popup">
        <div class ="unverified_warning {{if require_dns_info.dns.isVerified == true}}hidden{{/if}}">
            <span>${ASC.Mail.Resources.MailAdministrationResource.UnverifiedDomainRecordWarning}</span>
        </div>
        <table>
            <tr>
                <td class ="verified_icon">
                    <div class="icon {{if require_dns_info.dns.mxRecord.isVerified == true}}verified{{/if}}"></div>
                </td>
                <td>
                    <div class="dns_record">
                        <span class="dns_record_info">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardMXRecord}</span>
                        <ul>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardType}&nbsp;<span class="bold">MX</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardTextOrValue}&nbsp;<span class="bold">${require_dns_info.dns.mxRecord.host}.</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardPriority}&nbsp;<span class="bold">${require_dns_info.dns.mxRecord.priority}</span></span></li>
                        </ul>
                    </div>
                </td>
            </tr>
            <tr>
                <td class ="verified_icon">
                    <div class="icon {{if require_dns_info.dns.spfRecord.isVerified == true}}verified{{/if}}"></div>
                </td>
                <td>
                    <div class="dns_record">
                        <span class="dns_record_info">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardSPFRecord}</span>
                        <ul>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardType}&nbsp;<span class="bold">TXT</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardName}&nbsp;<span class="bold">${require_dns_info.dns.spfRecord.name}</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardTextOrValue}&nbsp;<span class="bold">"${require_dns_info.dns.spfRecord.value}"</span></span></li>
                        </ul>
                    </div>
                </td>
            </tr>
            <tr>
                <td class ="verified_icon">
                    <div class="icon {{if require_dns_info.dns.dkimRecord.isVerified == true}}verified{{/if}}"></div>
                </td>
                <td>
                    <div class="dns_record">
                        <span class="dns_record_info">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardDKIMRecord}</span>
                        <ul>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardType}&nbsp;<span class="bold">TXT</span></span></li>
                            <li><span>${ASC.Mail.Resources.MailAdministrationResource.DomainWizardName}&nbsp;<span class="bold">${require_dns_info.dns.dkimRecord.selector}._domainkey</span></span></li>
                            <li><span class="dkim">${ASC.Mail.Resources.MailAdministrationResource.DomainWizardTextOrValue}&nbsp;<span class=" dkim_record bold">"${require_dns_info.dns.dkimRecord.publicKey}"</span></span></li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
        <div class="progressContainer">
            <div class="loader" style="display: none;">${ASC.Mail.Resources.MailResource.LoadingLabel}</div>
        </div>
        <div class="buttons">
            <button class="button middle blue cancel" type="button">${ASC.Mail.Resources.MailScriptResource.OkBtnLabel}</button>
            <button class="button middle gray verify {{if require_dns_info.dns.isVerified == true}}hidden{{/if}}" type="button">${ASC.Mail.Resources.MailAdministrationResource.VerifyButton}</button>
        </div>
    </div>
</script>
